<template>
	<div>
		<el-dialog title="用料清单详情" width="1000px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
      <el-table :data="form" height="calc(200vh - 400px)">
        <el-table-column label="物料编码" property="materialNo"></el-table-column>
        <el-table-column label="物料名称" property="materialName"></el-table-column>
        <el-table-column label="物料规格" property="specification"></el-table-column>
        <el-table-column label="单位" property="unit"></el-table-column>
        <el-table-column label="分子" property="numerator"></el-table-column>
        <el-table-column label="分母" property="denominator"></el-table-column>
        <el-table-column label="固定损耗率" property="fixscrapqty"></el-table-column>
        <el-table-column label="变动损耗率" property="scraprate"></el-table-column>
        <el-table-column label="标准用量" property="stdQty"></el-table-column>
        <el-table-column label="需求用量" property="needQty"></el-table-column>
        <el-table-column label="应发数量" property="mustQty"></el-table-column>
        <el-table-column label="几锅完成" property="batch"></el-table-column>
        <el-table-column label="生产订单号" property="taskBillNo"></el-table-column>
      </el-table>
		</el-dialog>
	</div>
</template>
<script>
import { detail  } from '@/api/app/proppbom'
export default {
	name:'proppbomdetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:[]
		}
	},
	watch:{
		show(val){
			if(val){
			}
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
				this.form = res.data
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss';
</style>
